package com.wendy.read.member.service.Impl;


import com.wendy.read.member.pojo.EmailProperties;
import com.wendy.read.member.service.EmailService;
import com.wendy.read.member.utils.MailUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmailServiceImpl implements EmailService {

    @Autowired
    private EmailProperties emailProperties;
    /**
     *
     * @param to 收件人邮箱
     * @param title 邮件标题
     * @param content 邮件正文
     * @return
     */
    @Override
    public boolean send(String to, String title, String content) {
        System.out.println(emailProperties);
        return MailUtil.sendMail(emailProperties, to, title, content);
    }
}
